import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;

import org.lwjgl.util.glu.GLU;
import org.newdawn.slick.opengl.Texture;

import res.GLResourceLoader;

import application.openGL.GLApplication2D;
import application.openGL.GLApplication3D;

public class Main 
{
    public static void main(String[] args) 
    {
	new Test().start();
    }
}
class Test extends GLApplication3D implements MouseWheelListener
{
    Texture test;
    int theta;
    float zoom;
    @Override
    protected void init() 
    {
	theta = 0;
	zoom = 45f;
	test = GLResourceLoader.loadTexture("asdf.png");
    }

    @Override 
    protected void update(double delta) 
    {
	theta++;
    }

    @Override
    protected void render() 
    {
	
	//gl.setColor(0xFFFFFF);
	for(int i = 0; i<10; i++)
	{
	    gl.drawRectangularPrism(i*-2+10, -1, -10, 500, 500, 500, theta);
	}
    }

    @Override
    public void mouseWheelMoved(MouseWheelEvent e) 
    {
	zoom+=e.getPreciseWheelRotation();
	GLU.gluPerspective(zoom, ((float) size.width / (float) size.height), 0.1f, 100.0f);
    }
}